/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package g7.util;

import java.io.Serializable;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

/**
 *
 * @author julianna
 */

public class FacesMessageUtil implements Serializable {

    private static final long serialVersionUID = 4846479116877685420L;

    public static void mensagemInfo(String message) {
        FacesContext.getCurrentInstance().
                addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, message, null));
    }

    public static void mensagemError(String message) {
        FacesContext.getCurrentInstance().
                addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, message, null));


    }

    public static void mensagemFatal(String message) {
        FacesContext.getCurrentInstance().
                addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, message, null));
    }

    public static void mensagemWarn(String message) {
        FacesContext.getCurrentInstance().
                addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, message, null));
    }
}
